#!/bin/bash 
password="Linan2002@";user="root";host="localhost";port="3306"
all_bak() {
echo "all_bak"
echo "$user;$password;$port;$host"
}
incr_bak() {
echo "incr_bak"
echo "$user;$password;$port;$host"
}
sql_sh() {
weekday=`date +%w`
case $weekday in 
  1)
     echo "今天是周一,做完整备份"
     echo $user
     all_bak  
     ;;
  *)
     echo "今天不是周一,做增量备份"
     incr_bak
     ;;
esac
}
